﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FrameDisplayServer.Browser
{
    public class IEBrowserForm : BrowserForm
    {
        private WebBrowser webBrowser;

        public IEBrowserForm()
        {
            this.webBrowser = new WebBrowser();
            this.webBrowser.Dock = DockStyle.Fill;
            this.Controls.Add(this.webBrowser);
        }

        public override void Navigate(string url)
        {
            this.webBrowser.BeginInvoke(new Action<string>(InternalNavigate), new object[] { url });
        }

        private void InternalNavigate(string url)
        {
            this.ShowWindow();
            this.webBrowser.Navigate(url);
        }
    }
}
